Skip to content

test(landing): cover the /open route whitelist with vitest - #12

Merged
kipavy merged 1 commit into
mainfrom
test/landing-runner
Aug 18, 2026
Merged

test(landing): cover the /open route whitelist with vitest#12
kipavy merged 1 commit into
mainfrom
test/landing-runner

Conversation

@kipavy

@kipavy kipavy commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

landing/ had no test runner. The route whitelist in landing/app/open/fragment.ts decides which deep-link routes may hop out to a voltius:// URL, and it must stay in step with the client's ROUTES table — a security boundary with zero regression coverage until now.

  • vitest (node environment, app/**/*.test.ts), pnpm test.
  • 24 cases over readFragment: valid join and verified targets, the whitelist failing closed on unlisted routes (settings, plugin/install, snippet/install, connect, wrong case, path traversal), per-route parameter validation, and hostile parameters that must not inject another scheme or authority.
  • A GitHub Actions job running pnpm lint and pnpm test on landing/ changes. The repo had no workflows at all.

Mutation-checked: adding settings: () => true to ROUTE_VALIDATORS fails rejects #settings?section=mcp. Adding a route in Part 3 of VoltiusApp/voltius#144 will have to touch this file too, which is the intent.

pnpm lint, pnpm test (24 passed) and pnpm build clean locally.

landing/ had no test runner, so the fragment whitelist on /open — the
boundary that decides which deep-link routes may hop out to voltius:// —
had no regression coverage. Adds vitest, 24 cases over readFragment
(whitelist, per-route parameter validation, hostile parameters), and a
GitHub Actions job running lint and test on landing changes.
@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
voltius Ready Ready Preview Aug 18, 2026 7:22pm
voltius-portal Ready Ready Preview Aug 18, 2026 7:22pm

@kipavy
kipavy merged commit 8f191e4 into main Aug 18, 2026
5 checks passed
@kipavy
kipavy deleted the test/landing-runner branch August 18, 2026 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant